<%@ page import="java.util.List" %>
<%@ page import="service.EmpService" %>
<%@ page import="entity.Emp" %><%--
  Created by IntelliJ IDEA.
  User: lishunlin110
  Date: 2021/8/26
  Time: 23:01
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <style>
        table{
            border: 10px coral;
            margin: auto;
        }
    </style>
    <title>员工信息展示页面</title>
</head>
<body>
<table >
<tr>
    <td>id</td>
    <td>姓名</td>
    <td>薪资</td>
    <td>年龄</td>


        <% List<Emp> empList = (List<Emp>) request.getAttribute("empList");%>
         <% for (Emp e:empList){%>
    </tr>
            <%int id= e.getId();
                String name = e.getName();
                double salary = e.getSalary();
                int age = e.getAge();%>
        <td><%=Integer.toString(id)%></td>
        <td><%=name%></td>
        <td><%=Double.toString(salary)%></td>
        <td><%=Integer.toString(age)%></td>
    <tr>
            <%}%>



</table>
</body>
</html>
